package cn.zymall.goods.controller;

import cn.zymall.common.controller.crud.BaseController;
import cn.zymall.common.model.SpuImg;
import cn.zymall.goods.service.SpuImgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lxh
 * @Description 商品图片控制层
 * @date 2020/8/22 23:22
 * @Classname SpuDetailController
 **/
@RestController
@RequestMapping("/spuDetail")
public class SpuImgController extends BaseController<SpuImgService, SpuImg> {
	@Autowired
	private SpuImgService spuImgService;


	/**
	 * 添加商品图片
	 * @param SpuImg
	 */
	@PostMapping("/add")
	public void add(SpuImg SpuImg){
		spuImgService.add(SpuImg);
	}


	/**
	 * 修改商品图片
	 * @param spuImg
	 */
	@PostMapping("/amend")
	public void amend(SpuImg spuImg){
		spuImgService.amend(spuImg);
	}
}
